package com.itheima.gaunbing;

import java.util.concurrent.ArrayBlockingQueue;

public class Demo01 {

    public static void main(String[] args) {
        ArrayBlockingQueue<String> queue = new ArrayBlockingQueue<>(10);
        Hanze hanze = new Hanze(queue);
        Dama dama = new Dama(queue);
        Thread t1 = new Thread(hanze);
        Thread t2 = new Thread(hanze);
        Thread t3 = new Thread(hanze);
        Thread t4 = new Thread(hanze);
        Thread t5 = new Thread(dama);
        t1.start();
        t2.start();
        t3.start();
        t4.start();
        t5.start();

    }
}
